home *** CD-ROM | disk | FTP | other *** search
- Path: aadt.sdt.com!usenet
- From: david_hooker@sdt.com
- Newsgroups: comp.lang.c++
- Subject: Advanced C++ question...
- Date: 20 Mar 1996 20:57:20 GMT
- Organization: SABRE Decision Technologies
- Message-ID: <4iprfg$1ui@aadt>
- Reply-To: david_hooker@sdt.com
- NNTP-Posting-Host: 144.9.150.154
- X-Newsreader: IBM NewsReader/2 v1.02
-
- Hi all...
-
- I want to write an operator* for a class, but I want to do
- one of 2 things:
- 1. Call one of two different operator*'s depending on whether
- it is an lvalue or rvalue
- OR
- 2. Somehow determine in the function if it is being used as an
- lvalue or an rvalue.
-
- For instance, I want to know, in the operator*, from which case I'm
- being called:
-
- *Object = SomeValue; // used as an lvalue
-
- SomeValue = *Object; // used as an rvalue
-
-
- The reason for this is that this class accesses data differently depending
- on if it is a read or write access.
-
- Thanks...
-
- -dave-
-
-
-
-
-